/*
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
 * You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * Portions created by the Initial Developer are
 * Copyright (C) 2012 the Initial Developer.
 * All Rights Reserved.
 *
 * The Original Code is "http://semi-frame.googlecode.com/svn/trenk/".
 *
 * The Initial Developer of the Original Code is the author below.
 */
/**
 * @file NetMessage.h
 * @brief auto generated.
 * @author morningcloud
 * @date 2011/03/11
 */

#ifndef SEMITCPMESSAGE_H_
#define SEMITCPMESSAGE_H_

#include "semi/TimerMessage.h"
#include "semi/CurrentTasks.h"
#include "semi/util/SocketUtil.h"
#include "semi/conf/NetConfig.h"

namespace semi {

class NetMessage {
public:
	NetMessage();
	virtual ~NetMessage();

	//	void init(conf::NetConfig::TcpConfig cnf);
	void start(conf::NetConfig::TcpConfig cnf);
	//	bool end();

	std::string TaskId;
	unsigned short port;
	unsigned short listen;

	//	static void sweep(std::string tskid);
	static void sweep(conf::NetConfig::TcpConfig cnf);

	static void send(conf::NetConfig::TcpConfig cnf, std::string message);
	static void send(conf::NetConfig::TcpConfig cnf, void* message, int size);
};

}

#endif /* SEMITCPMESSAGE_H_ */
